import request from '@/utils/request'

// 查询餐厅列表
export function listCanteen(query) {
  return request({
    url: '/jypc/canteen/list',
    method: 'get',
    params: query
  })
}

// 查询所i有餐厅列表
export function listCanteenAll() {
  return request({
    url: '/jypc/canteen/listAll',
    method: 'get'
  })
}

// 查询餐厅详细
export function getCanteen(canteenid) {
  return request({
    url: '/jypc/canteen/' + canteenid,
    method: 'get'
  })
}

// 新增餐厅
export function addCanteen(data) {
  return request({
    url: '/jypc/canteen',
    method: 'post',
    data: data
  })
}

// 修改餐厅
export function updateCanteen(data) {
  return request({
    url: '/jypc/canteen',
    method: 'put',
    data: data
  })
}

// 删除餐厅
export function delCanteen(canteenid) {
  return request({
    url: '/jypc/canteen/' + canteenid,
    method: 'delete'
  })
}
